package com.sc.nft.entity.vo.ecology;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.sc.nft.dao.StaticDataDao;
import com.sc.nft.enums.EcologyIncomeTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class MyPointsRecordsVO {


    @ApiModelProperty(value = "收益类型")
    private EcologyIncomeTypeEnum incomeType;

    @ApiModelProperty(value = "获得燃料")
    private String incomeAmount;

    @ApiModelProperty(value = "释放燃料")
    private String releaseAmount;

    @ApiModelProperty(value = "失效燃料")
    private String freezeAmount;

    @ApiModelProperty(value = "过期时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date effectiveTime;

    @ApiModelProperty(value = "获取时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date getTime;

    @ApiModelProperty(value = "收益类型名称")
    private String incomeTypeName;

    public void setIncomeAmount(BigDecimal incomeAmount) {
        this.incomeAmount = incomeAmount.setScale(2,BigDecimal.ROUND_DOWN).toPlainString();
    }

    public void setReleaseAmount(BigDecimal releaseAmount) {
        this.releaseAmount = releaseAmount.setScale(2,BigDecimal.ROUND_DOWN).toPlainString();
    }

    public void setFreezeAmount(BigDecimal freezeAmount) {
        this.freezeAmount = freezeAmount.setScale(2,BigDecimal.ROUND_DOWN).toPlainString();
    }

}
